# Maintainer: Noel Kuntze <noel.kuntze@contauro.com>
pkgname=grommunio-error-pages
pkgdesc="Grommunio-branded error pages for web servers"
pkgver=1.0_git20231031
pkgrel=0
arch="noarch !riscv64"
url="https://grommunio.com/"
license="AGPL-3.0-only"
options="!check" # No test suite
makedepends="python3"

_commithash=bb2df37c0856363764e3289e2ac0e5df74ef0c1f

source="$pkgname-$pkgver.tar.gz::https://github.com/grommunio/grommunio-error-pages/archive/$_commithash.tar.gz
	0001-makefile.patch
	0002-conf-webapps-path.patch
	"

builddir="$srcdir/$pkgname-$_commithash/"

build() {
	make
}

check() {
	make check
}

package() {
	mkdir -p "$pkgdir"
	make install DESTDIR="$(realpath $pkgdir)"

	# license
	install -Dm0644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha512sums="
a2b8c2531efaae2538c97b595921c9fb62983846fae65bea55a4b234dab5240b0ac78e5a97a4cfcd5e085d318f123239669e311850a3995ad3c7a922e7c4ec43  grommunio-error-pages-1.0_git20231031.tar.gz
db9b919f3eadcf283bae64ea0f6505f355dd3bec7f4e46119de6fa1f6d36ccac65215988a9a35bff6d90a727ade253dbf720e0ec498fb27bab95d2a5e68dcf71  0001-makefile.patch
6f5567f662cb1fd97028806486287df84c01894fa5454bc04e0e67df5e31166aa17e920e385b200420127a0a1f4caf376e51e1a3eeac5edeec4adb8affacdd15  0002-conf-webapps-path.patch
"
